package com.itcast.demo;

import com.itcast.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    private static ApplicationContext ac=new ClassPathXmlApplicationContext("applicationContext.xml");
    private static UserDao userDao = (UserDao) ac.getBean("userDao");
    public static void main(String[] args) {
        while (true){
            userDao.query();
        }
    }
}
